/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoo.gamecenter.sdk.login.plugin.g;

import android.content.Context;
import android.text.TextUtils;
import com.qihoo.gamecenter.sdk.login.plugin.h.e;
import com.qihoo.gamecenter.sdk.login.plugin.h.f;
import org.json.JSONException;
import org.json.JSONObject;

public class b implements o {
    private String a;
    private JSONObject b = null;

    public void a(String paramString, Context paramContext) {
        b();
        this.a = paramString;
        a(paramString);
        a(this.b, paramContext);
        e.a("BaseTaskTermination", new Object[] { "networkResult = ", this.a });
        e.a("BaseTaskTermination", new Object[] { "json = ", this.b });
    }

    private void a(String paramString) {
        if (TextUtils.isEmpty(paramString))
            return;
        try {
            this.b = new JSONObject(paramString);
        } catch (Exception localException) {
            e.b("BaseTaskTermination", "", localException);
        }
    }

    public String a() {
        if (this.b != null) {
            JSONObject localJSONObject = a(this.b);
            if (localJSONObject != null) {
                e.a("BaseTaskTermination", new Object[] { "network content = ", localJSONObject });
                return localJSONObject.toString();
            }
        }
        return null;
    }

    private JSONObject a(JSONObject paramJSONObject) {
        try {
            return this.b.getJSONObject("content");
        } catch (JSONException localJSONException) {
            e.b("BaseTaskTermination", "", localJSONException);
        }
        return null;
    }

    public void a(JSONObject paramJSONObject, Context paramContext) {
        try {
            if (paramJSONObject != null) {
                int i = paramJSONObject.getInt("error_code");
                if (i != 0)
                    a(paramContext, i, paramJSONObject.getString("error_msg"), false);
            }
        } catch (JSONException localJSONException) {
            e.b("BaseTaskTermination", "", localJSONException);
        }
    }

    public void a(Context paramContext, int paramInt, String paramString, boolean paramBoolean) {
        f.a(paramContext, paramInt, paramString, paramBoolean);
    }

    public void b() {}
}